<?php

namespace App\Observers;

use App\Models\HospitalInformation;
use App\servers\EsServer;

class HospitalInformationObserver
{
    /**
     * Handle the HospitalInformation "created" event.
     *
     * @param  \App\Models\HospitalInformation  $hospitalInformation
     * @return void
     */
    public function created(HospitalInformation $hospitalInformation)
    {
        $Es=new \App\servers\wjy\EsServer();
        $Es->EsAdd('hospital',$hospitalInformation->toArray());
    }

    /**
     * Handle the HospitalInformation "updated" event.
     *
     * @param  \App\Models\HospitalInformation  $hospitalInformation
     * @return void
     */
    public function updated(HospitalInformation $hospitalInformation)
    {
        //
    }

    /**
     * Handle the HospitalInformation "deleted" event.
     *
     * @param  \App\Models\HospitalInformation  $hospitalInformation
     * @return void
     */
    public function deleted(HospitalInformation $hospitalInformation)
    {
        //
    }

    /**
     * Handle the HospitalInformation "restored" event.
     *
     * @param  \App\Models\HospitalInformation  $hospitalInformation
     * @return void
     */
    public function restored(HospitalInformation $hospitalInformation)
    {
        //
    }

    /**
     * Handle the HospitalInformation "force deleted" event.
     *
     * @param  \App\Models\HospitalInformation  $hospitalInformation
     * @return void
     */
    public function forceDeleted(HospitalInformation $hospitalInformation)
    {
        //
    }
}
